<!--
* @description 龙界2.0信息汇总
* @fileName longjie.vue
* @author huangyu
* @date 2022/06/28 09:36:25
!-->
<template>
    <div class="longjieContentApp">
        <van-nav-bar title="进击龙界" />
        <div style="margin:10px 0;">
            <van-cell value="" v-for="(item,index) in list" :key="index" is-link @click="showPopup(item)">
                {{item.title}}
            </van-cell>
        </div>

        <van-popup v-model="showDetail" round position="bottom" :style="{ height: '75%' }">
            <div class="verDetail">
                <h1>{{model.title}}</h1>
                <div class="time">创建时间：{{model.createTime | formatDate}}</div>
                <div v-html="model.content" class="content">{{model.content}}</div>
            </div>
        </van-popup>
    </div>
</template>

<script>
import { get } from '@/common/app.js'
import { formatDate } from '@/common/unit.js'
export default {
    components: {},
    data() {
        return {
            list: [],
            showDetail: false,
            model: {},
            isPower:  localStorage.power,
        }
    },
    mounted() {
        this.getData()
    },
    methods: {
        getData(){
            let params = {
                type: 'getAionVer',
                data: {
                    type: 'getVER',
                },
            }
            get('game',params).then(res=>{
                if(res){
                    this.list = res.data.reverse()
                }
            })
        },
        showPopup(row){
            this.showDetail = true
            this.model = row
        },
    },
    filters: {
        formatDate(time) {
            var date = new Date(time);
            let res = formatDate(date, "yyyy-MM-dd hh:mm:ss");
            return res;
        },
    }
}
</script>

<style lang="less">
.longjieContentApp {
    .verDetail{
        padding: 10px;
        line-height: 200%;
        h1{font-size: 16px;text-align: center;}
        .time{text-align: center;color:#999;font-size:12px;}
        .content{
            img {
                max-width: 100%;
            }
        }
    }
}
</style>